Repository navigation
fix(metadata-protocol)!: the metadata lists serve nothing a disabled package's customization pair or a dependent's added bundle member carries for it (ADR-0150 D3) - #33405
Conversation
… the name is never another package's moved edit (ADR-0150 D4)
…s the name at a bundle addition; changesets and ADR-0087 entry
…air row and a dependent's addition to its bundle (ADR-0150 D3) Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn Co-authored-by: Claude <noreply@anthropic.com>
…w and a dependent's addition, both orders Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn Co-Authored-By: Claude <noreply@anthropic.com>
… a disabled holder; changeset Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 06cacce13b5a2ff1292d24f2722a07d23ee0c195 && git checkout 06cacce13b5a2ff1292d24f2722a07d23ee0c195
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2797f81db7f78d0197f007b7ba502b5816e518c1 a785894002a5362576dce88bfac41ceaad4a767a && git checkout -B drift-repro 2797f81db7f78d0197f007b7ba502b5816e518c1 && git merge --no-ff a785894002a5362576dce88bfac41ceaad4a767a
node scripts/docs-audit/affected-docs.mjs --json 2797f81db7f78d0197f007b7ba502b5816e518c1 |
|
domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn Request: review · area E1 · head 333edb0 · 2026-11-14T18:54Z Fixes #32354 (ADR-0150 D3, list doors): the metadata lists serve nothing a disabled package's customization pair or a dependent's added bundle member carries for it. Declares a narrowing (BREAKING); the dependent's own send losing its added locale while the base is disabled is declared and restored by #33385 / #32670. Local dogfood not measured (verify lock); the merge queue's dogfood shards run it. Reviewer: review#1. |
|
Contract-review-claim: session_016WV4cwxS1ZpSu2hAMRcqbt · head 333edb0 · 2026-11-14T18:55Z review#1 (E1) takes this head. |
Contract reviewServed-tier: Face: narrowing ( ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing, judged against the published spec and ADR-0150 D3 on Implemented-by: VERDICT: PASS |
# Conflicts: # packages/objectql/src/package-scoped-exact-qualifier.test.ts
Contract reviewServed-tier: Delta of record 6882605735 (PASS on ① Derived judgments
② Semver levelUnchanged from record 6882605735: ③ Boundary flagsUnchanged. N1–N2 of record 6882605735 stand as nits. ④ Design judgmentUnchanged. The PR's own source hunks are byte-identical by patch id, and the resolution only places two independent test blocks side by side. Record 6882605735's judgment carries to this head. Implemented-by: VERDICT: PASS |
…n, and the boot load joins the hydration-state pins (objectstack-ai#33483) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDwkEEJd65kqFZGFjQnzBQt)_ Fixes objectstack-ai#32716 Clause-②: yes (narrowing) Metadata-protocol: none **BREAKING** for a TypeScript caller that narrows `type` to `PackageScopedType` through the exported `judgesPackageLessRows(registry, type)` (for example `if (judgesPackageLessRows(r, t)) useScoped(t)`): its return type is now `boolean`, so that call no longer compiles. Call `isPackageScopedType(type)` from `@objectstack/core` first. The runtime answer is unchanged; the level stays patch. <!-- adr-0087: not-required (no-migration-prescription) no key of any schema is added, removed, renamed or re-shaped and no stored row changes shape: what moves is one exported function's TypeScript return type --> ## 维护者速读 - 改了什么:① `judgesPackageLessRows` 的返回类型由类型谓词改为普通 `boolean`,运行时答案不变;`packageLessRowOwners` 改用 `isPackageScopedType` 收窄类型。② N3 实测:按包精确读一条包外 action 存储行,在载入前后(启动加载、列表读、裸槽副本)答案一致,都是持有者自己的条目,所以不改代码,只把「启动加载」补进现有的载入状态 pin。 - 为什么改:① 谓词会让调用方的 false 分支被收窄成 never,但 false 其实取决于注册表。② 卡片说的「载入前 200、载入后 409」在当前 main 上已不存在(objectstack-ai#32568 的裁决已经处理),这里实测确认并钉住启动加载这一路。 - 风险与回滚:仅类型签名与测试;无读答案变化。回滚 = revert 本 PR。 - 先看:`packages/metadata-protocol/src/protocol-exact-qualifier.ts`(`judgesPackageLessRows` 签名与 `packageLessRowOwners` 首行);`packages/objectql/src/package-scoped-exact-qualifier.test.ts` 的 location 4 `STATES`。 - 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run src/package-scoped-exact-qualifier.test.ts -t "location 4"`,预期全部通过,含新增的 `after the boot load` 用例。 - 需要你做的:无,席位落地。 ## What changes 1. **N1.** `judgesPackageLessRows(registry, type)` returned the type predicate `type is PackageScopedType`. Its `false` depends on the registry (`readsByPackage`), so the predicate narrowed a package-scoped type to `never` in a caller's `false` branch. It now returns `boolean`. One caller relied on the predicate: `packageLessRowOwners` passed the narrowed `type` to `isPlatformRequestedBareName`. It now narrows through `isPackageScopedType`, which depends on the type alone. The CLI caller (`stored-package-references.ts`, a `filter`) typechecks unchanged. The runtime answer is unchanged. 2. **N3, measured: the answers are the same, so no read moves.** A stored package-less `action` row of a name a package ships was read at the holder's exact address (`?package=`) and in the layered read. It was read before and after each hydration path: the boot load (`loadMetaFromDb`), the list read's hydrator (`getMetaItems`), and a copy in the registry's bare slot stamped `''` or `sys_metadata`. Each path was run with one holder and with two holders in both registration orders. The answer was the holder's own item every time (200), and the layered read reported no overlay. The card's 200-before / 409-after premise came from before the epic ruling 6817768147 on objectstack-ai#32568. That ruling's change makes the hydrator decline the row (`hydrateOverlayIntoRegistry`) and makes the exact read replace a bare-slot copy (`declinedCopyReplaced`). The list read and the bare-slot copies were already pinned (location 4 of `[objectstack-ai#32568]`). The boot load was not, so this PR adds it to those pins for `action`, `queue` and `tool`, with one holder and two. No ADR-0150 D4 ruling is needed for N3: nothing differs, so nothing is implemented beyond the pins. ## Tests - `packages/metadata-protocol/src/protocol-exact-qualifier.test.ts`: a new case, `[objectstack-ai#32716 N1]`. It is checked by `tsc`, and the package's `typecheck` compiles the file (`tsc --listFiles` lists it). In the `false` branch, a `hook` typed `PackageScopedType` keeps that type. - `packages/objectql/src/package-scoped-exact-qualifier.test.ts`, location 4: a new state, `after the boot load`, in both registration orders × `action`/`queue`/`tool` (6 new cases). The one-holder case now walks before → after the boot load → after the read-side hydrator. The boot-load leg asserts the load reached the row (`loaded: 1, errors: 0`), so the pin cannot pass without a load. All runs on head `4bb529d89` (the merge of `origin/main` 0c2aeb9 into the branch), through `scripts/pm/os-verify-lock.sh`: <details><summary>Unit and package runs</summary> - `pnpm --filter @objectstack/metadata-protocol typecheck` → exit 0; `pnpm --filter @objectstack/metadata-protocol test` → Test Files 340 passed, 9 skipped (349); Tests 22866 passed, 43 skipped. VERDICT command-exit 0. - `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/package-scoped-exact-qualifier.test.ts` → Tests 294 passed (294). Before the change the file held 288; the 6 new cases are the boot-load state. - `pnpm --filter @objectstack/cli typecheck` (after building its dependency closure, which included the new `.d.ts`) → exit 0, and `check:test-typecheck` OK. This is the one other caller of `judgesPackageLessRows`. - `objectql` is a tests-only touch here: its full suite and the `integration` layers are left to CI (`Test Core`). </details> <details><summary>Ablations (one-shot; nothing left in the tree)</summary> - **N1.** Ran `scripts/ablation-replace.mjs` on `protocol-exact-qualifier.ts`, replacing the anchor `type: string): boolean {` with the predicate `type is import('@objectstack/core').PackageScopedType`. The anchor went x1 to x0 and the blob changed. `typecheck` then went RED, with one error at the new pin: `protocol-exact-qualifier.test.ts(98,42): error TS2344 ... Actual: never`. The file was restored to blob == HEAD and `git diff HEAD` came back empty. - **N3 boot-load pin.** The hydrator's decline branch in `protocol-registry-hydration.ts` (`if (scoped && canonicalType !== 'flow' && !options.packageId && host.declinesStoredRow(`) was put behind an always-false guard. The rebuilt `dist/` was proven to carry the marker (`ablation-dist-preflight`). Location 4 then went RED, 6 failed: `after the boot load exact: expected 'stored' to be 'alpha action'`, the same for `queue` and `tool`, plus the pre-existing disabled-holder cases. After the restore, the rebuild was proven free of the marker (`--absent`), and the file is back to 294 passed. </details> <details><summary>N3 measurement on main (ba35dfd with only the type-only N1 edit on top; a throwaway describe, not committed)</summary> The stored package-less `action` row is `approve`, and A and B are the shipping packages. Below, "own" means the holder's own item, and "layered own" means the layered read reported no overlay and its effective item was the holder's own. | holders | hydration | `?package=A` before / after | `?package=B` before / after | layered before / after | |---|---|---|---|---| | A | boot load | 200 own / 200 own | 409 not held / 409 not held | own / own | | A | list read | 200 own / 200 own | 409 / 409 | own / own | | A | bare copy `''`, `sys_metadata` | 200 own / 200 own | 409 / 409 | own / own | | A+B, B+A | boot load | 200 own / 200 own | 200 own / 200 own | own / own | | A+B, B+A | list read | 200 own / 200 own | 200 own / 200 own | own / own | | A+B, B+A | bare copy `''`, `sys_metadata` | 200 own / 200 own | 200 own / 200 own | own / own | The boot load reported `{loaded:1, errors:0}` and left the holder's slot holding the holder's own item. A boot load run before the package registers, and then the package, also gives 200 own at each holder's exact address. </details> ## Acceptance notes - **Clause-② reading.** First declared `no`; review#3's contract record (6885158237) ruled the exported return type public surface, so a caller narrowing through the predicate's `true` branch stops compiling: `yes (narrowing)`, `!` title, BREAKING paragraph, one ADR-0087 not-required marker (same reading as review#1 on objectstack-ai#33121). Delta head 82cc3c1 changes only the changeset and this body. - **Not in scope, harness observation only, not filed.** In the same harness, a bare read naming no package with a bare-slot copy in place answers differently from the exact read. With one holder it serves the copy; with two it is refused naming "3 holders". The exact read serves the holder's own in both cases. The bare-slot copy is a hand-registered state: the hydrator no longer produces it, and the heal walk is said to remove a pre-install copy. This harness registers packages without that walk, so no public door was measured. `reach:` none measured. - E1's open PR objectstack-ai#33405 edits the same objectql test file at a different hunk (after line 2529); this PR's hunk is at location 4 (lines 2228–2270). ## Verification Derived gate families (`node scripts/pm/dispatch-gates.mjs --commands`, from the tree at the merge head `4bb529d89`): 64 commands. Each was run, and its exit code was captured before any pipe: - **63 exit 0.** These include `check:changeset-no-major`, `check:adr-0087-registration`, `check:empty-changeset`, `check:closing-keyword-parity`, `check:nul-bytes`, `check:test-source-alias`, `check:cross-package-test-inputs`, `check:type-check-coverage`, `check:type-check-debt`, `check:durability-log-level`, `check:engine-double-contract`, `check:published-files`, `check:dts-closure`, `check:doc-authoring` and `check:issue-citations`. - **1 NOT MEASURED:** `pnpm check:dual-build-cjs-loads`, exit 3, `PREREQUISITE NOT MET`. It reads every package's `dist/`, and this worktree did not build the whole repo. CI carries it. - **Reconciliation:** `dispatch-gates --ran` with the exit codes recorded: 64 derived, 63 run, 1 NOT-MEASURED (derived from the recorded exit 3), 0 UNRUN. - **Lint:** `eslint --no-inline-config` on the three changed `.ts` files gives exit 0. The repo-wide `pnpm lint` is CI's. - No symbol was renamed or removed, so `check-platform-checklist --changed-from` does not apply. - The full farm, dogfood and the `integration` layers are CI's. The title carries no `!` and there is no `(narrowing)` arm, so no dogfood battery is owed. Session: https://claude.ai/code/session_016WV4cz4f7zEQZ2C9GTG382 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…s what it sends when only the enabled one holds it (objectstack-ai#33678) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D3DpgJLtDkE1fR76z3bz5Xm)_ Part of objectstack-ai#32670 Clause-②: no Metadata-protocol: none The card stays open: its `_env` half is objectstack-ai#33385 (area E1, still open). This PR is the "separate, declared move" that objectstack-ai#33361's acceptance notes and its contract review (record 6882047833, item ③) left owed once objectstack-ai#32354 landed. objectstack-ai#32354 landed in objectstack-ai#33405 (merged 2026-11-14T22:08Z, before objectstack-ai#33361). ## 维护者速读 - 改了什么:邮件模板名有一个持有包被停用、只剩一个在服务的持有包时,发送(经元数据协议的执行列表)改为读环境级列表,与"只有这一个包持有该名"时完全一致;另把 `servedBundleAddressOf` 中不可达的环境项分支改为"找不到模板"(复审 nit N1)。 - 为什么改:ADR-0150 D3「停用的包不持有任何名字」。objectstack-ai#32354(objectstack-ai#33405)落地后,环境级列表已不再列出停用包一侧的成员(自身项、定制对行、依赖包追加的语言),所以地址可以只按在服务持有包数量来选;此前读该包自己的地址,会漏掉依赖它的包追加的语言。 - 风险与回滚:只在有持有包被停用、且只剩一个在服务持有包时生效。实测唯一变化:该持有包的定制对行与依赖包追加语言落在同一语言时,答案从定制对行变为依赖包的语言,与停用包根本不持有该名时的答案相同。没有包停用时、或无协议只读注册表时,答案不变。回滚即 revert 本 PR。 - 先看:`packages/plugins/plugin-email/src/template-loader.ts` 的 `servedBundleAddressOf`(`onServedCount` 与 `servedCountDecides` 参数)以及 `readBundle` 中 `viaProtocol` 的传入;`template-loader.test.ts` 中 `two holders, BETA disabled` 一例的期望与新的 `one holder` CONTROL。 - 两分钟验证:`pnpm --filter @objectstack/plugin-email exec vitest run src/template-loader.test.ts`,预期 80 个测试全部通过。 - 需要你做的:无,席位落地 ## What changes `packages/plugins/plugin-email/src/template-loader.ts`, `servedBundleAddressOf` (the branch taken only while a holder of the name is disabled): - **The address is chosen on the served count when the bundle is read from the protocol's execution list.** One served holder ⇒ the environment-wide list (`undefined`), two or more ⇒ the answering holder's own address, exactly as `bundleAddressOf` chooses on the holder count when nothing is disabled. This applies to both answers that read a package's bundle: the name resolving to a served holder, and the closure re-resolve (a caller holding an addition only, or the built-ins for an `auth.*` name). - **Why it is safe now:** since objectstack-ai#33405 (objectstack-ai#32354) the environment-wide execution list holds no member of a disabled holder's side: its own items were already filtered, and the list naming no package now withholds its customization pair's rows and a dependent's added bundle members. So the read beside a disabled holder answers what it answers when that holder holds nothing of the name. - **The registry's own list keeps the per-holder address.** `registry.listItems` (read only when no protocol is registered) withholds neither, so there the move would leak a dependent's addition to the disabled holder (measured, see the second ablation). `readBundle` passes `viaProtocol` into `bundleAddressOf` as `servedCountDecides`. - **Nit N1:** the environment-item branch (`resolved.holder.kind` other than `package`) now answers `NO_BUNDLE` instead of the environment-wide read. It is unreachable while a holder is disabled (a name a package holds resolves to no environment item), so no answer moves; "no read is made beside a disabled holder for it" now holds by construction. - Doc comments on `bundleAddressOf` and `servedBundleAddressOf` restate the rule. Changeset: `@objectstack/plugin-email` patch. ### Moved answers Probe: the objectstack-ai#33361 world (a real `SchemaRegistry` and the protocol's real `getMetaItemsForExecution` over stored rows), 8 disabled states × 2 registration orders × 2 reads × 9 callers × 2 locales = 1,152 answers, on `babd5d4a` (FROM, `main`) and on this branch (TO), plus the same worlds with the disabled package's side removed instead of disabled (ABSENT: it ships nothing of the name; for ALPHA also no pair row and no dependent's addition). | Read | State | Caller | Locale | FROM | TO | ABSENT | |:--|:--|:--|:--|:--|:--|:--| | protocol | two holders, BETA disabled (ALPHA carries a pair row and a dependent's addition, both fr-FR) | omitted, null, ALPHA, BOTH, VIA_ALPHA, ADDER | fr-FR | the pair's row (`PAIR fr-FR`) | the dependent's addition (`ADDER fr-FR`) | `ADDER fr-FR` | 12 answers move (6 callers × 2 orders), all toward the ABSENT answer; 0 of the 1,152 move away from it. The answers that still differ from ABSENT number 204 (216 on FROM), and every one is a declared row of objectstack-ai#33361: the disabled package's own send (row 36), the environment's item or a package-less stored row beside a name only a disabled package holds (row 37), and the registry-only read (below). With nothing disabled the code path is unchanged (`bundleAddressOf`'s first branch), and the pinned CONTROLs hold. ## Tests `packages/plugins/plugin-email/src/template-loader.test.ts`, describe `a disabled package holds no name at the send (ADR-0150 D3, objectstack-ai#32670)`: - The `two holders, BETA disabled` case's protocol expectations move fr-FR from `PAIR fr-FR` to `ADDER fr-FR` for the six callers above (its registry-read override is unchanged: `no template`). - A new CONTROL, state `one holder` (ALPHA alone holds the name, nothing disabled), pins the answers the BETA-disabled case must equal for every caller but BETA itself. 1 case × 2 orders × 2 reads = 4 new tests; the file runs 80 (76 on `main`). ## Acceptance notes - **The registry-only read keeps a disabled-vs-absent difference.** With no protocol registered and BETA disabled, a fr-FR send for ALPHA's callers answers `no template` (ALPHA's own address, which the registry list narrows by `_packageId`), where ABSENT answers `ADDER fr-FR`. The move cannot be applied there because `registry.listItems` still lists a dependent's addition to a disabled holder (ablation 2 measures the leak). A host with no protocol has no metadata door; noted, not filed. - **The moved answer prefers the dependent's addition over the holder's pair row at the same locale.** That is `main`'s answer for a name one package holds with nothing disabled (the new CONTROL, both orders, and objectstack-ai#33361's R4-F note), not a rule this PR adds: the move only makes the disabled case equal to it. - **Not in this PR:** the `_env` cell of objectstack-ai#32183 row 17 (objectstack-ai#33385, area E1, `packages/metadata-protocol/src/**`) and the R4-G flow doors, as objectstack-ai#33361 recorded. So `Part of objectstack-ai#32670`, not a closing line. - The probe files were temporary and are not committed. ## Verification Read at `7612a59d` (the change). The head `9754555c` adds one merge of `origin/main` (`dd291b83` era, no conflict); the incoming commits touch no file of `plugin-email` and nothing in the list reads or the package-scoped resolver the loader calls (they change `objectql` engine-update, search and validation files and `metadata-protocol`'s seed loader and registry question), so the readings below are not re-run on the merge; CI reads the head. <details><summary>Tests, typecheck and lint (plugin-email), at 7612a59</summary> ``` pnpm --filter @objectstack/plugin-email test Test Files 53 passed (53) · Tests 1018 passed (1018) pnpm --filter @objectstack/plugin-email typecheck exit 0 · check:test-typecheck OK (0 errors) pnpm exec eslint (the two changed source files) exit 0 os-verify-lock: VERDICT command-exit 0 ``` </details> <details><summary>Ablation 1: the pins against main's loader (template-loader.ts restored from babd5d4)</summary> ``` on-disk mutation: servedCountDecides count=0 (HEAD has 6) × read: protocol > registered as listed > two holders, BETA disabled × read: protocol > registered reversed > two holders, BETA disabled Tests 2 failed | 78 passed (80) VERDICT command-exit 1 restored: git checkout HEAD -- the file; blob hash equals HEAD's; git status clean ``` </details> <details><summary>Ablation 2: the move forced onto the registry read (servedCountDecides passed as true)</summary> ``` anchor before: 1 · after: 0 · injected: 1 × read: registry > two holders, ALPHA disabled (both orders: ADDER fr-FR leaks) × read: registry > two holders, BETA disabled (both orders) × read: registry > an auth name one package overrides, ALPHA disabled (both orders: ADDER fr-FR leaks) Tests 6 failed | 74 passed (80) VERDICT command-exit 1 restored: blob hash equals HEAD's; git status clean ``` </details> <details><summary>Gate families</summary> Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at 7612a59 (64 commands), each run locally with its exit code captured before any pipe: ``` 61 of 64 exit 0 (check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check-issue-citations, check:engine-double-contract, check:test-source-alias, check:registry-log-declared, check:cross-package-test-inputs, check:nul-bytes, check:published-files, check:type-check-coverage, the comment-mask corpus and the rest) NOT MEASURED, 3 (prerequisites of this checkout, not readings of the diff; CI runs each): check-plugin-teardown-shape --self-test exit 3: shallow clone, positive control commit unreachable check:dual-build-cjs-loads exit 3: PREREQUISITE NOT MET, reads every package's dist/ check:type-check-debt exit 3 under the 4096 MB heap cap; re-run uncapped, it began a whole-closure build under the shared lock, stopped (not read) ``` </details> --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cx5ZPCyTk8ckTsx4ut)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #32354
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none —
skills/**andcontent/docs/**teach that a disabled module is hidden (content/docs/deployment/marketplace-handbook.mdx) and never teach a list serving a disabled package's customization or a dependent's addition to its bundle, so no taught sentence moves.维护者速读
包名.custom)为它的名字存的行,也不再列出依赖它的包给它的邮件模板追加的语言版本。涉及:不指名包的列表及其执行列表、指名停用包的列表、指名其定制包的列表。不指名包的发信读的就是这个执行列表,所以也不再发出这两类内容。?package=DEP)仍列出它追加的语言。过渡期内从依赖包本身发信(读不指名列表)在基础包停用时找不到该语言,等 ADR-0150: the email template send judges the served holders (a disabled package holds no name at the send) #32670 让发信按在用持有者判定后恢复。回滚即 revert 本 PR,不改任何存储数据。packages/metadata-protocol/src/protocol-meta-list-reads.ts的disabledHolderListing(新增谓词,'unscoped'分支里依赖包追加的判定)以及它在停用过滤处的调用。pnpm --filter @objectstack/objectql exec vitest run src/package-scoped-exact-qualifier.test.ts -t 32354,预期 14 例全过。What changes
One function, in
@objectstack/metadata-protocol's list read (readFlattenedMetaItems), next to the existing disabled-package filter, on the effective and execution faces only (the per-package layer, which the package export reads, keeps a disabled package's items as before):disabledHolderListing(host, type)answers whether an item the list serves at a package is a disabled holder's. It isundefined(nothing moves) for a type the registry does not read by package and while no installed package is disabled.disabledExactAddressHolder(protocol-exact-qualifier.ts, unchanged): the package is disabled, or it is a customization pair whose every base holding the name is.ITEM_KEY_DISCRIMINATORS), an addition to a disabled holder's bundle: the item's package holds the name only as an addition (the registry's holders read as any other caller leave it out, read as itself keep it) and every holder in its declared dependency closure is disabled. Every holder is read withincludeDisabledPackages, so a disable never promotes an addition to a holder.Moved answers
Measured over a real
SchemaRegistryandObjectStackProtocolImplementation, on2b2e5b41(FROM: #33251's head,mainplus #32606) and on this branch: A shipswelcomeinen-US; A's pairA.customstores afr-FRrow of it, or DEP (depends on A) ships afr-FRaddition; with one holder, or beside B, an enabled second holder ofwelcome. Both registration orders, the pair row stored before and after the registrations. A disabled:getMetaItems/getMetaItemsForExecution, no package (GET /meta/email_template)fr-FRrow, or DEP'sfr-FR(beside B'sen-USwith two holders)en-USonly with two holders, else nothing)?package=Afr-FRrow[]?package=A.customfr-FRrowfr-FR(createRegistryEmailTemplateLoaderover the protocol)fr-FRNot moved. With nothing disabled every list answers as on FROM (CONTROL in every pin).
?package=DEPkeeps DEP'sfr-FR, as?package=DEP&member=fr-FRserves it.?package=Band B's items, the pair's own item of a name A ships nothing of (CONTROL, both orders), the per-package layer, and every by-name read answer as before. Re-enabling A restores every list (asserted in every pin).Declared interim move. A send from DEP itself resolves to the list naming no package for this name (
bundleAddressOffinds one holder), so it no longer finds DEP'sfr-FRwhile A is disabled. #32670 (the send judges the served holders, nested under this card and landing after it) reads such a send at DEP's own address, which keeps the member.Red lines
Tests
packages/objectql/src/package-scoped-exact-qualifier.test.ts, top-level[#32354] the list doors serve nothing a disabled holder's pair or dependent carries for it(real registry and protocol,environmentIdunset so the list hydrates rows): 12 cases (four states × both registration orders × both save orders for the pair row) asserting seven lists with nothing disabled, A disabled (read twice), and A re-enabled; plus 2 CONTROLs for the pair's own item.packages/rest/src/meta-disabled-package-doors.test.ts,[#32354] RestServer: the list doors and the send naming no package beside a disabled holder(an environment-scoped protocol):GET /meta/email_templateunscoped and withpackage=A, A.custom, DEP through theRestServerroute, and the email loader's send with no package and from DEP; 6 cases.Acceptance notes
RestServerroute on this branch, with A the sole holder and disabled,GET /meta/email_template/welcome?member=fr-FR(no package) answers 200 with the pair'sfr-FRrow, and 200 with DEP'sfr-FRin the addition state. With two holders (B enabled) it answers 404 in both states. That path isprotocol-meta-item-face.ts, held by metadata-protocol: the bare read still serves an App-pair row of an email_template member whose only holder is disabled #32814's work, so it is reported for a card, not changed here.51ceb433), and this branch mergedorigin/main87330e8959once (no rebase). The diff againstmainis this card's four files: the list read, two test files and one changeset.Verification
Head
333edb0868(this branch withorigin/main87330e8959merged).Pins and ablations
src/package-scoped-exact-qualifier.test.ts -t 32354: 14 passed. RESTsrc/meta-disabled-package-doors.test.ts: 47 passed (the 6 new cases among them).scripts/ablation-replace.mjs,@objectstack/metadata-protocolrebuilt under the verify lock,ablation-dist-preflightsaw the marker indist/, then restored:git diff HEADempty, rebuilt, marker--absentexit 0):disabledExactAddressHoldernever withholds): objectql 8 failed (every pair-row case: one and two holders, both orders, both save orders), 6 passed (the four addition cases and both CONTROLs); REST 4 failed (every pair-row case), 43 passed.bases.every(disabled)never true): objectql 4 failed (every addition case), 10 passed; REST 2 failed (both addition cases), 45 passed.dist/) and its green run was discarded; the rerun above is the leg.Package tests, typecheck, lint
turbo run test --concurrency=2 --continueover the affected set againstmain(82 packages,@objectstack/dogfoodleft to its own battery), under the verify lock: stopped on the area lead's order once it held the lock too long, after 68 packages had finished, with 0 failed test files. Among them@objectstack/metadata-protocol339 files passed (9 skipped),@objectstack/objectql595,@objectstack/rest410,@objectstack/runtime599,@objectstack/cli637 (2 skipped),@objectstack/plugin-email53. The rest of the set (UI packages) is CI's Test Core.pnpm --filtermetadata-protocol, objectql, restrun typecheck: exit 0 (VERDICT command-exit 0).pnpm lint: exit 0.(narrowing)arm; not run, because the shared lock was the bottleneck and the area lead asked for the narrowed pre-push set; the queue'sDogfood Regression Gateruns it), and the derived gate families (CI'sLint & Repo Gates).🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn